﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace XDUD_QuanLyBanHang
{
    public partial class frmQuanLyKhachHang : Form
    {
        // Hàm xemm danh mục
        void XemDanhMuc(int intDanhMuc)
        {
            Form DanhMuc = new frmDanhMuc();
            DanhMuc.Text = intDanhMuc.ToString();
            DanhMuc.ShowDialog();
        }
        public frmQuanLyKhachHang()
        {
            InitializeComponent();
        }

        private void frmQuanLyBanHang_Load(object sender, EventArgs e)
        {
            Form frm = new frmDangNhap();
            frm.ShowDialog();
        }

        private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {

        }

        private void đăngNhậpToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form DangNhap = new frmDangNhap();
            DangNhap.ShowDialog();
        }

        private void thoátToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DialogResult traloi;
            traloi = MessageBox.Show("Bạn có chắc không?", "Thông Báo", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
            if (traloi == DialogResult.OK)
            {
                Application.Exit();
            }
        }

        private void danhMụcThànhPhốToolStripMenuItem_Click(object sender, EventArgs e)
        {
            XemDanhMuc(1);
        }

        private void danhMụcKháchHàngToolStripMenuItem_Click(object sender, EventArgs e)
        {
            XemDanhMuc(2);
        }

        private void danhMụcNhânViênToolStripMenuItem_Click(object sender, EventArgs e)
        {
            XemDanhMuc(3);
        }

        private void danhMụcSảnPhẩmToolStripMenuItem_Click(object sender, EventArgs e)
        {
            XemDanhMuc(4);
        }

        private void danhMụcHóaĐơnToolStripMenuItem_Click(object sender, EventArgs e)
        {
            XemDanhMuc(5);
        }

        private void danhMụcChiTiếtHóaĐơnToolStripMenuItem_Click(object sender, EventArgs e)
        {
            XemDanhMuc(6);
        }

        private void toolStripMenuItem2_Click(object sender, EventArgs e)
        {
            Form danhmuctp = new frmQuanLyDanhMucThanhPho();
            danhmuctp.ShowDialog();
        }

        private void toolStripMenuItem4_Click(object sender, EventArgs e)
        {
            Form danhmucnv = new frmQuanLyDanhMucNhanVien();
            danhmucnv.ShowDialog();
        }

        private void toolStripMenuItem3_Click(object sender, EventArgs e)
        {
            Form danhmuckh = new frmQuanLyDanhMucKhachHang();
            danhmuckh.ShowDialog();
        }

        private void kháchHàngTheoThànhPhốToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new frmQuanlydanhmuckhachhangtheonhomthanhpho();
            frm.ShowDialog();
        }

        private void toolStripMenuItem5_Click(object sender, EventArgs e)
        {
            Form danhmucsp = new frmQuanLyDanhMucSanPham();
            danhmucsp.ShowDialog();
        }

        private void hóaĐơnTheoSảnPhẩmToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmHoaDonTheoSanPham HoaDonSanPham = new frmHoaDonTheoSanPham();
            HoaDonSanPham.ShowDialog();
        }

        private void hóaĐơnTheoNhânViênToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmHoaDonTheoNhanVien HoaDonNhanVien = new frmHoaDonTheoNhanVien();
            HoaDonNhanVien.ShowDialog();
        }

        private void toolStripMenuItem7_Click(object sender, EventArgs e)
        {
            Form frm = new frmChitiethoadon();
            frm.ShowDialog();
        }

        private void hóaĐơnTheoKháchHàngToolStripMenuItem_Click(object sender, EventArgs e)
        {
           
        }

        private void chiTiếtHóaĐơnTheoHóaĐơnToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmChiTietHoaDonTheoHoaDon hoadon = new frmChiTietHoaDonTheoHoaDon();
            hoadon.ShowDialog();
        }

        private void quảnLýĐaCấpToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmQuanLyDaCap dacap = new frmQuanLyDaCap();
            dacap.ShowDialog();
        }

        
    }
}
